package publics.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


@Entity
@Table(name="proposer_lawsuit")
public class ProposeLawsuit {//申请人法律诉讼或仲裁
	
	 private Integer id;//ID  int not null,
	 private Enterprise ent;
	 private String role;//原告还是被告       varchar(4) not null,
	 private String cause;//诉讼或仲裁原因     varchar(100) not null,
	 private Float money;// 诉讼金额       Float not null,
	   //primary key (Pro_law_id)
	 @Id
	 @GeneratedValue
	 @Column(name="Pro_law_id")
	public Integer getId() {
		return id;
	}
	 @ManyToOne(fetch=FetchType.LAZY)
	 @JoinColumn(name="Ent_id",nullable=false)
	public Enterprise getEnt() {
		return ent;
	}
	 @Column(name="Pro_law_role")
	public String getRole() {
		return role;
	}
	 @Column(name="Pro_law_cause")
	public String getCause() {
		return cause;
	}
	 @Column(name="Pro_law_money")
	public Float getMoney() {
		return money;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setEnt(Enterprise ent) {
		this.ent = ent;
	}
	public void setRole(String role) {
		this.role = role;
	}
	public void setCause(String cause) {
		this.cause = cause;
	}
	public void setMoney(Float money) {
		this.money = money;
	}
	
	
	
	
	public ProposeLawsuit() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public ProposeLawsuit(Integer id, String role, String cause, Float money) {
		super();
		this.id = id;
		this.role = role;
		this.cause = cause;
		this.money = money;
	}
	
	public ProposeLawsuit(Integer id, Enterprise ent, String role,
			String cause, Float money) {
		super();
		this.id = id;
		this.ent = ent;
		this.role = role;
		this.cause = cause;
		this.money = money;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "ProposeLawsuit [cause=" + cause + ", ent=" + ent + ", id=" + id
				+ ", money=" + money + ", role=" + role + "]";
	}
	
	
}
